#!/bin/env node

/**
 * 应用配置信息
 */

var catg = 'dev';


console.info('+++++++++++++++++++++++++++++++++++++++++++++++++++');
console.info('DB-CONFIG-TYPE: ' + catg);

var config = require('./config-' + catg + '.js');


module.exports = {
	/* 是否使用HTTPS */
	'use_ssl': config['use_ssl'] || false,

	/* 文件发送对端配置 */
    'remoteftpip':config['remoteftpip'],
    'remoteftpport':config['remoteftpport'],
    'remoteftpuser':config['remoteftpuser'],
    'remoteftppwd':config['remoteftppwd'],

    'apstadatapath':config['apstadatapath'],
    'dpidatapath':config['dpidatapath'],
    'devicetype':config['devicetype'],
    'version':config['version'],

	/* 静态资源 */
	'static_host': config['static_host'],
    'static_port': config['static_port'],
	
	/* 数据库配置参数 */
	'db_host': config['db_host'] || process.env.DB_HOST,
	'db_port': config['db_port'] || process.env.DB_PORT,
	'db_name': config['db_name'] || process.env.DB_NAME,
	'db_user': config['db_user'] || process.env.DB_USER,
	'db_passwd': config['db_passwd'] || process.env.DB_PASSWD,
	'db_charset': 'UTF8',
	'db_conn_limit': 5000,
	
	/* 日志配置 */
	'log_type': config['log_type'] || 'console',
	'log_level': config['log_level'] || 0, // 0-TRACE, 1-DEBUG, 2-INFO, 3-WARN, 4-ERROR, 5-FETAL
	
	/* 缓存配置 */
	'cache_type': 'global',
	'pageSize': 30
};
